package Tar

import (
	"archive/tar"
)

func ReadTarHeader(tarFilePath string) (map[string]*tar.Header, error) {
	return readTarHeader(tarFilePath)
}

func ReadTarPathHeader(tarFilePath, dirPath string) (map[string]*tar.Header, error) {
	return readTarPathHeader(tarFilePath, dirPath)
}

func ReadTarContent(tarFilePath, fileName string) ([]byte, error) {
	return readTarContent(tarFilePath, fileName)
}

func ExistTarContent(tarFilePath, fileName string) (bool, error) {
	return existTarContent(tarFilePath, fileName)
}

func ExtractTarFile(tarPath, destPath string) error {
	return extractTarFile(tarPath, destPath)
}

func CreateTarFile(dirPath, tarFilePath string) error {
	return createTarFile(dirPath, tarFilePath)
}

func AppendTarFile(tarFilePath, addFilePath, fileName string) error {
	return appendTarFile(tarFilePath, addFilePath, fileName)
}

func AppendTarBuffFile(tarFilePath string, content []byte, fileName string) error {
	return appendTarBuffFile(tarFilePath, content, fileName)
}
